package com.bye.xiaomi_mall.domain;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券对象 td_coupon
 *
 * @author ruoyi
 * @date 2025-03-15
 */
public class TdCoupon extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 优惠券id
     */
    private Long id;

    /**
     * 优惠券名称
     */
    @Excel(name = "优惠券名称")
    private String name;

    /**
     * 描述
     */
    @Excel(name = "描述")
    private String synopsis;

    /**
     * 适用类别（一个类型或全部类型）
     */
    @Excel(name = "适用类别", readConverterExp = "一=个类型或全部类型")
    private String trialCategory;

    /**
     * 使用条件
     */
    @Excel(name = "使用的条件")
    private String need;
    @Excel(name = "条件的要求")
    private String num;

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    /**
     * 减免金额
     */
    @Excel(name = "减免金额")
    private String money;

    /**
     * 生效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "生效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTime;

    /**
     * 失效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime failureTime;

    /**
     * 优惠券总数
     */
    @Excel(name = "优惠券总数")
    private String sumCount;

    /**
     * 优惠券剩余数量
     */
    @Excel(name = "优惠券剩余数量")
    private String remainingCount;

    /**
     * 兑换码
     */
    @Excel(name = "兑换码")
    private String redemptionCode;

    /**
     * 状态 1 可使用  0 已失效
     */
    @Excel(name = "状态 1 可使用  0 已失效  ")
    private String status;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSynopsis(String synopsis) {
        this.synopsis = synopsis;
    }

    public String getSynopsis() {
        return synopsis;
    }

    public void setTrialCategory(String trialCategory) {
        this.trialCategory = trialCategory;
    }

    public String getTrialCategory() {
        return trialCategory;
    }

    public void setNeed(String need) {
        this.need = need;
    }

    public String getNeed() {
        return need;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getMoney() {
        return money;
    }

    public void setEffectiveTime(LocalDateTime effectiveTime) {
        this.effectiveTime = effectiveTime;
    }

    public LocalDateTime getEffectiveTime() {
        return effectiveTime;
    }

    public void setFailureTime(LocalDateTime failureTime) {
        this.failureTime = failureTime;
    }

    public LocalDateTime getFailureTime() {
        return failureTime;
    }

    public void setSumCount(String sumCount) {
        this.sumCount = sumCount;
    }

    public String getSumCount() {
        return sumCount;
    }

    public void setRemainingCount(String remainingCount) {
        this.remainingCount = remainingCount;
    }

    public String getRemainingCount() {
        return remainingCount;
    }

    public void setRedemptionCode(String redemptionCode) {
        this.redemptionCode = redemptionCode;
    }

    public String getRedemptionCode() {
        return redemptionCode;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("synopsis", getSynopsis())
                .append("trialCategory", getTrialCategory())
                .append("need", getNeed())
                .append("money", getMoney())
                .append("effectiveTime", getEffectiveTime())
                .append("failureTime", getFailureTime())
                .append("sumCount", getSumCount())
                .append("remainingCount", getRemainingCount())
                .append("redemptionCode", getRedemptionCode())
                .append("status", getStatus())
                .toString();
    }
}